function lazyLoadOptions(selectElement, options) {
  const BATCH_SIZE = 100;
  let currentIndex = 0;

  function loadBatch() {
    const batch = options.slice(currentIndex, currentIndex + BATCH_SIZE);
    
    batch.forEach(item => {
      const option = document.createElement('option');
      option.value = item.value;
      option.text = item.text;
      selectElement.appendChild(option);
    });

    currentIndex += BATCH_SIZE;
    
    if (currentIndex < options.length) {
      requestAnimationFrame(loadBatch);
    }
  }

  loadBatch();
}

// 使用示例
const select = document.getElementById('mySelect');
const options = Array.from({ length: 10000 }, (_, i) => ({
  value: i,
  text: `Option ${i}`
}));

lazyLoadOptions(select, options);